﻿FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 7100

FROM microsoft/dotnet:2.1-sdk AS build
WORKDIR /src
COPY Hicap.QRCodeWarehouse.Processor/Hicap.QRCodeWarehouse.Processor.csproj Hicap.QRCodeWarehouse.Processor/
RUN dotnet restore Hicap.QRCodeWarehouse.Processor/Hicap.QRCodeWarehouse.Processor.csproj
COPY . .
WORKDIR /src/Hicap.QRCodeWarehouse.Processor
RUN dotnet build Hicap.QRCodeWarehouse.Processor.csproj -c Release -o /app

FROM build AS publish
RUN dotnet publish Hicap.QRCodeWarehouse.Processor.csproj -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .



ENTRYPOINT ["dotnet", "Hicap.QRCodeWarehouse.Processor.dll"]
